{[foreach name=outer key=key item=item from=$result]}
BEGIN:VCARD
VERSION:2.1
N;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:{[$item.first]};{[$item.last]};;{[$item.job]};
FN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:{[$item.name]}
TITLE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:{[$item.job]}
TEL;CELL;VOICE:{[$item.short]}
TEL;WORK;VOICE:{[$item.exten]}
EMAIL;PREF;INTERNET:{[$item.email]}
{[if $item.photo_base64 ne '' and $smarty.request.photo eq '1']}PHOTO;ENCODING=BASE64;JPEG:{[$item.photo_base64]}{[/if]}

END:VCARD
{[/foreach]}